import request from '@/utils/request'


export function getRolePages(data) {
  return request({
    url: '/sys-role',
    method: 'get',
    params: data
  })
}

export function addRole(data) {
  return request({
    url: '/sys-role',
    method: 'post',
    data
  })
}


export function updateRole(id, data) {
  return request({
    url: `/sys-role/${id}`,
    method: 'put',
    data
  })
}

export function deleteRole(id) {
  return request({
    url: `/sys-role/${id}`,
    method: 'delete'
  })
}